<html>
<head>
<style type="text/css" media="screen">
	html {
		background:#DBDEE7;
	}
	body {
		font-family:trebuchet ms;
		font-size:12px;
		background:white;
		padding:20px;
		border:4px solid #B3BDE7;
	}
	h1 {
		font-family:georgia;
		font-size:3.8em;
		font-weight:normal;
		letter-spacing:-1px;
	}
	a {
		color:#C87026;
	}
	a:hover {
		color:#97251E;
	}
	tr {
		border-bottom:2px solid #ccc;
		margin:0;
	}
	td,th {
		text-align:left;
		padding:12px;
		border-bottom:1px solid #ccc;
		margin:0;
	}
</style>
<%= javascript_include_tag 'prototype' %>
</head>
<body>
<h1><img src="/images/logo.png"/> CRS Reports</h1>
<table>
<tr>
	<th>Phone:</th>
	<th>Time:</th>
	<th>Diaster type:</th>
	<th>Village name:</th>
	<th>Gram Panchayat:</th>
	<th>Block:</th>
	<th>District:</th>
	<th>Individuals per Household:</th>
	<th>Total Families:</th>
</tr>
<% for sub in @submissions %>
<tr>
	<td><a href="javascript:void();" onClick="$('submission_id_<%= sub.id %>').toggle();"><%= sub.phone_id %></a></td>
	<td><%= time_ago_in_words(sub.created_at) %> ago</td>
	<td><%= sub.crs_type %></td>
	<td><%= sub.crs_village %></td>
	<td><%= sub.crs_panchayat %></td>
	<td><%= sub.crs_block %></td>
	<td><%= sub.crs_district %></td>
	<td><%= sub.crs_population %></td>
	<td><%= sub.crs_total_fam %></td>
</tr>
<tr style="background:#f3f3f3;display:none;font-size:.8em;" id="submission_id_<%= sub.id %>">
	<td style="text-align:right;">
	</td>
	<td colspan="7">
   		<p>CRS Detailed Report</p>
	</td>
</tr>
<% end %>
</table>
</body>
</html>